<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	request.setAttribute("actionEntity","caip");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=basePath%>resource/theme/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath%>resource/javascript/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/javascript/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath%>resource/javascript/messages_zh.js"></script>
<script type="text/javascript">
 $(document).ready(function(){
	 $("#saveUpdateForm").validate({debug:false});
});
</script>
</head>

<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a>	</li>
	<li><a href="#">菜品维护</a>	</li>
	<li><a href="#">菜品添加</a></li>
    </ul>
    </div>
    <div class="formbody">
    <div class="formtitle"><span>菜品添加</span></div>
    <form id="saveUpdateForm" action="<%=basePath%>${actionEntity}-saveUpdate.action" method="post">
    <input type="hidden" name="entity.id" value="${entity.id}" />
    
        <ul class="forminfo">
<%--    	<li><label>id</label><input id="entityid" class="dfinput" type="text" name="entity.id"  value="${ entity.id}" data-rule-required="true"/></li>--%>
		<li><label>菜品名称</label><input id="entityname" class="dfinput" data-rule-required="true" type="text" name="entity.name"  value="${ entity.name}" /></li>
<%--		<li><label>createtime</label><input id="entitycreatetime" class="dfinput" type="text" name="entity.createtime"  value="${ entity.createtime}" data-rule-required="true"/></li>--%>
		<li><label>原材料A</label>
			<select name="entity.ext1"  class="dfinput" data-rule-required="true">
			<option value="" >--请选择--</option>
			    <c:forEach items="${products}" var="item">
			    	<option value="${item.name}" <c:if test="${item.name==entity.ext1}">selected="selected"</c:if>>${item.name}</option>
			    </c:forEach>
		    </select>
<%--		<input id="entityext1" class="dfinput" type="text" name="entity.ext1"  value="${ entity.ext1}" data-rule-required="true"/>--%>
		</li>
		<li><label>原材料B</label>
		<select name="entity.ext2"  class="dfinput">
		<option value="" >--请选择--</option>
			    <c:forEach items="${products}" var="item">
			    	<option value="${item.name}" <c:if test="${item.name==entity.ext1}">selected="selected"</c:if>>${item.name}</option>
			    </c:forEach>
		    </select>
<%--		<input id="entityext2" class="dfinput" type="text" name="entity.ext2"  value="${ entity.ext2}" data-rule-required="true"/>--%>
		</li>
		<li><label>原材料C</label>
		<select name="entity.ext3"  class="dfinput">
		<option value="" >--请选择--</option>
			    <c:forEach items="${products}" var="item">
			    	<option value="${item.name}" <c:if test="${item.name==entity.ext1}">selected="selected"</c:if>>${item.name}</option>
			    </c:forEach>
		    </select>
<%--		<input id="entityext3" class="dfinput" type="text" name="entity.ext3"  value="${ entity.ext3}" data-rule-required="true"/>--%>
		</li>
		<li><label>原材料D</label>
		<select name="entity.ext4"  class="dfinput">
		<option value="" >--请选择--</option>
			    <c:forEach items="${products}" var="item">
			    	<option value="${item.name}" <c:if test="${item.name==entity.ext1}">selected="selected"</c:if>>${item.name}</option>
			    </c:forEach>
		    </select>
<%--		<input id="entityext4" class="dfinput" type="text" name="entity.ext4"  value="${ entity.ext4}" data-rule-required="true"/>--%>
		</li>
		<li><label>原材料E</label>
		<select name="entity.ext5"  class="dfinput">
				<option value="" >--请选择--</option>
			    <c:forEach items="${products}" var="item">
			    	<option value="${item.name}" <c:if test="${item.name==entity.ext1}">selected="selected"</c:if>>${item.name}</option>
			    </c:forEach>
		    </select>
<%--		<input id="entityext5" class="dfinput" type="text" name="entity.ext5"  value="${ entity.ext5}" data-rule-required="true"/>--%>
		</li>
	    
    
    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/></li>
    </ul>
    </form>
    </div>
</body>
</html>
